<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
$(function (){
	$.get(contextPath+"/Monitor/monitor.dhc", {
		 'mrLot':"2014Y12MC", 
		 'mrType':"MC",
		 'monitorType':"dep",
		 'quotaCode':"All",
		 'pardepCode':depCode,
		 'pardepgroupCode':"",
		 'pargroupName': "",
		 'parmdddesc':"",
		 'paradrgCode': "",
		 'pardrgCode': ""}).done(function(data){
	$("#"+tabId+" #multiquotaHosp-table").dataTable({
		"bDestroy": true,
		"bPaginate": false, //翻页功能
		"bLengthChange": false, //改变每页显示数据数量
		"bFilter": false, //过滤功能
		"bInfo": false, //页脚信息
	    "aaData": data.data,
	    'bStateSave': true, 
	    "aoColumnDefs": [
	                     {
	                    	 sDefaultContent: '',
	                    	 aTargets: [ '_all' ]
	                     },
	                     { "bSortable": false, "aTargets": [5 ] }
	                     ],
	    "aaSorting": [
	                  [ 0, "asc" ]
	             ],       
	    "rownumbers" : true,
	    "sPaginationType": "full_numbers",
	    "aoColumns": [ 
	                     { "mDataProp": "ddesc"},
	                     { "mDataProp": "CMI"},
	                     { "mDataProp": "DRGCount"},
 	                     { "mDataProp": "AvgDays"},
 	                     { "mDataProp": "AvgFee"},
 	                     { "mDataProp": "Risk1Ratio"},
	  	                 { "mDataProp": "TimeEff"},
	  	                 { "mDataProp": "FeeEff"},
	  	               	 { "mDataProp": "TotalScore"},
	                 ]
		});
	});
	$.get(contextPath+"/Monitor/monitor.dhc", {
			 'mrLot':"2014Y12MC", 
			 'mrType':"MC",
			 'monitorType':"clinic",
			 'quotaCode':"All",
			 'pardepCode':depCode,
			 'compareType':paramTabPage[tabId].compareType,
			 'pardepgroupCode':"",
			 'pargroupName': "",
			 'parmdddesc':"",
			 'paradrgCode': "",
			 'pardrgCode': ""}).done(function(data){
		$("#"+tabId+" #multiquotaDep-table").dataTable({
			"bDestroy": true,
			"bPaginate": false, //翻页功能
	 		"bLengthChange": false, //改变每页显示数据数量
	 		"bFilter": false, //过滤功能
	 		"bInfo": false, //页脚信息
		    "aaData": data.data,
		    'bStateSave': true, 
		    "aoColumnDefs": [
		                     {
		                    	 sDefaultContent: '',
		                    	 aTargets: [ '_all' ]
		                     },
		                     { "bSortable": false, "aTargets": [5 ] }
		                     ],
		    "aaSorting": [
		                  [ 0, "asc" ]
		             ],       
		    "rownumbers" : true,
		    "sPaginationType": "full_numbers",
		    "aoColumns": [ 
		                     { "mDataProp": "ddesc1",
	                    	   "fnRender": function(obj) {
		                    	  return "<a href=\"javascript:loadClinicss('"+obj.aData.ccode+"') \">"+obj.aData.ccode+"</a>";
	                    	 	}
		                     },
		                     { "mDataProp": "CMI"},
		                     { "mDataProp": "DRGCount"},
	  	                     { "mDataProp": "AvgDays"},
	  	                   	 { "mDataProp": "AvgFee",
    	                       "fnRender": function(obj){
    	                    	   var value = obj.aData.AvgFee;
    	                    	   var valuecc = obj.aData.AvgFeecc;
    	                    	   return compareValue(value, valuecc);
    	                       }
    	                     },
	  	                     { "mDataProp": "Risk1Ratio"},
		  	                 { "mDataProp": "TimeEff"},
		  	                 { "mDataProp": "FeeEff"},
		  	               	 { "mDataProp": "TotalScore"},
		  	               	 { "mDataProp": "OPERATION",
		  	               	   "fnRender": function(obj) {
		  	               		 return "<a href=\"javascript:loadDRGs('"+obj.aData.ccode+"') \">病种</a>";
		  	               	   }
		  	               	 }
		                 ]
			});
	});
	//科室CMI指标 (1.depGroup 2.CMI)
	$.get(contextPath+"/Monitor/monitor.dhc", {
		 'mrLot':"2014Y12MC", 
		 'mrType':"MC",
		 'monitorType':"clinic",
		 'quotaCode':"CMI",
		 'pardepCode':depCode,
		 'pardepgroupCode':"",
		 'pargroupName': "",
		 'parmdddesc':"",
		 'paradrgCode': "",
		 'pardrgCode': ""}).done(function(data){
	$("#"+tabId+" #onequotaDep-table").dataTable({
		"bDestroy": true,
		"bPaginate": false, //翻页功能
		"bLengthChange": false, //改变每页显示数据数量
		"bFilter": false, //过滤功能
		"bInfo": false, //页脚信息
	    "aaData": data.data,
	    'bStateSave': true, 
	    "aoColumnDefs": [
	                     {
	                    	 sDefaultContent: '',
	                    	 aTargets: [ '_all' ]
	                     },
	                     ],
	    "aaSorting": [
	                  [ 0, "asc" ]
	             ],       
	    "rownumbers" : true,
	    "sPaginationType": "full_numbers",
	    "aoColumns": [ 
	                     {  "mDataProp": "ddesc1",
                   	 		"fnRender": function(obj) {
	                    	return "<a href=\"javascript:loadClinicss('"+obj.aData.ccode+"') \">"+obj.aData.ccode+"</a>";
                   	 	 }
	                     },
	                     { "mDataProp": "QuotaValue"},
	                 ]
		});
	})
	//科室时间消耗指数
	$.get(contextPath+"/Monitor/monitor.dhc", {
		 'mrLot':"2014Y12MC", 
		 'mrType':"MC",
		 'monitorType':"clinic",
		 'quotaCode':"TimeEff",
		 'pardepCode':depCode,
		 'pardepgroupCode':"",
		 'pargroupName': "",
		 'parmdddesc':"",
		 'paradrgCode': "",
		 'pardrgCode': ""}).done(function(data){
	$("#"+tabId+" #onequota1-table").dataTable({
		"bDestroy": true,
		"bPaginate": false, //翻页功能
		"bLengthChange": false, //改变每页显示数据数量
		"bFilter": false, //过滤功能
		"bInfo": false, //页脚信息
	    "aaData": data.data,
	    'bStateSave': true, 
	    "aoColumnDefs": [
	                     {
	                    	 sDefaultContent: '',
	                    	 aTargets: [ '_all' ]
	                     },
	                     ],
	    "aaSorting": [
	                  [ 0, "asc" ]
	             ],       
	    "rownumbers" : true,
	    "sPaginationType": "full_numbers",
	    "aoColumns": [ 
	                     {  "mDataProp": "ddesc1",
                  	 	"fnRender": function(obj) {
	                    	return "<a href=\"javascript:loadClinicss('"+obj.aData.ccode+"') \">"+obj.aData.ccode+"</a>";
                  	 	}
	                     },
	                     { "mDataProp": "QuotaValue"},
	                 ]
		});
	});
	//科室综合得分
	$.get(contextPath+"/Monitor/monitor.dhc", {
		 'mrLot':"2014Y12MC", 
		 'mrType':"MC",
		 'monitorType':"clinic",
		 'quotaCode':"TotalScore",
		 'pardepCode':depCode,
		 'pardepgroupCode':"",
		 'pargroupName': "",
		 'parmdddesc':"",
		 'paradrgCode': "",
		 'pardrgCode': ""}).done(function(data){
	$("#"+tabId+" #onequota2-table").dataTable({
		"bDestroy": true,
		"bPaginate": false, //翻页功能
		"bLengthChange": false, //改变每页显示数据数量
		"bFilter": false, //过滤功能
		"bInfo": false, //页脚信息
	    "aaData": data.data,
	    'bStateSave': true, 
	    "aoColumnDefs": [
	                     {
	                    	 sDefaultContent: '',
	                    	 aTargets: [ '_all' ]
	                     },
	                     ],
	    "aaSorting": [
	                  [ 0, "asc" ]
	             ],       
	    "rownumbers" : true,
	    "sPaginationType": "full_numbers",
	    "aoColumns": [ 
	                     {  "mDataProp": "ddesc1",
                 	 	"fnRender": function(obj) {
	                    	return "<a href=\"javascript:loadClinicss('"+obj.aData.ccode+"') \">"+obj.aData.ccode+"</a>";
                 	 	}
	                     },
	                     { "mDataProp": "QuotaValue"},
	                 ]
		});
	});
})

function loadClinicss(ddesc){
	
}
function loadDRGs(ddesc){
	depGroupCode = "";
	clinicName = ddesc;
	monitorType="clinic";
	openTab('/pages/monitor/monitorDepGroupDRGs.jsp', "主诊组DRGs|"+ddesc, "monitorDRGs"+ddesc, "monitorDRGs"+ddesc ,{});
}
</script>
<body>
<div id="mycon" class="container-fluid">
	<div class="row">
		<h4 class="main-title">多指标查询</h4>
		<div id="multiquota">
			<table id="multiquotaHosp-table" class="stripe cc table" style="width:100%;">
				<thead>
					<tr><td>科室</td><td>CMI</td><td>DRGs组数</td><td>平均住院日</td><td>次均费用</td><td>低风险死亡率(%)</td><td>时间消耗指数</td><td>费用消耗指数</td><td>综合得分</td></tr>
				</thead>
				<tbody></tbody>
			</table>
			<table id="multiquotaDep-table" class="stripe cc table" style="width:100%;">
				<thead>
					<tr><td>主诊组</td><td>CMI</td><td>DRGs组数</td><td>平均住院日</td><td>次均费用</td><td>低风险死亡率(%)</td><td>时间消耗指数</td><td>费用消耗指数</td><td>综合得分</td><td>操作</td></tr>
				</thead>
				<tbody></tbody>
			</table>
		</div>
	</div>
	<div class="row">
		<h4 class="main-title">单指标查询</h4>
		<div>
			<div class="col-md-4">
				<div id="multiquota">
					<table id="onequotaDep-table" class="stripe cc table" style="width:100%;">
						<thead>
							<tr><td>主诊组</td><td>CMI</td></tr>
						</thead>
						<tbody></tbody>
					</table>
				</div>
			</div>
			<div class="col-md-4">
				<div id="multiquota">
					<table id="onequota1-table" class="stripe cc table" style="width:100%;">
						<thead>
							<tr><td>主诊组</td><td>时间消耗指数</td></tr>
						</thead>
						<tbody></tbody>
					</table>
				</div>
			</div>
			<div class="col-md-4">
				<div id="multiquota">
					<table id="onequota2-table" class="stripe cc table" style="width:100%;">
						<thead>
							<tr><td>主诊组</td><td>综合得分</td></tr>
						</thead>
						<tbody></tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>